package com.yupi.yuapicommon.model.dto.interfaceinfo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.List;

/**
 * @Author:
 * @Date: 2023/08/31 07:59:34
 * @Version: 1.0
 * @Description: 调用请求
 */
@Data
@ApiModel
public class InvokeRequest implements Serializable {

    private static final long serialVersionUID = 1L;
    /**
     * 主键
     */
    @ApiModelProperty(value = "主键id")
    private Long id;
    /**
     * 请求头参数
     */
    @ApiModelProperty(value = "请求头参数，json数组")
    private List<Field> headerParams;
    /**
     * 请求体参数
     */
    @ApiModelProperty(value = "请求体参数，json数组")
    private List<Field> bodyParams;
    /**
     * 路径参数
     */
    @ApiModelProperty(value = "路径参数，json数组")
    private List<Field> queryParams;

    @Data
    @ApiModel(value = "字段信息")
    public static class Field {
        @ApiModelProperty(value = "字段名")
        private String fieldName;
        @ApiModelProperty(value = "字段值")
        private String value;
        @ApiModelProperty(value = "字段类型")
        private String type;
        @ApiModelProperty(value = "字段描述")
        private String description;
//        @ApiModelProperty(value = "是否必填：0-可选、1-必须")
//        private Integer isRequire;
    }
}

